package com.dfrz.ch07;

/**
 * 作者：wangmaokang
 * 日期: 2021/4/15 16:48
 * 描述: "(([1-9])|([1-9]\\d)|(1\\d\\d|(2[0-4]\\d|25[0-5]))\\.){3}(([1-9])|([1-9]\\d)|(1\\d\\d|(2[0-4]\\d|25[0-5])))"
 */
public class IPTest {
    public static void main(String[] args) {
        String ipStr="255.255.255.255";

        System.out.println(ipStr.matches("(([1-9])|([1-9]\\d)|(1\\d\\d|(2[0-4]\\d|25[0-5]))\\.){3}(([1-9])|([1-9]\\d)|(1\\d\\d|(2[0-4]\\d|25[0-5])))"));

    }
}
